<?php

class User extends Zend_Db_Table_Abstract
{
    protected $_name = 'user';
    
    //insere um usuário no banco de dados
    public function insertUser($name,$password,$profession,$email,$tel)
    {
        $data = array(
            'name' => $name,
            'profession' => $profession,
            'email' => $email,
            'tel' => $tel,
            'password' => $password
        );
        
        $this->insert($data);
    }
    
    //retorna todos os usuários
    public function getUsers()
    {
        $select = $this->select();
        return ($this->fetchAll($select)->toArray());
    }
    
}